HandlerCompat

Helper for accessing features in Handler.

Functions

Link copied to clipboard
@NonNull
open fun createAsync(@NonNull looper: @NonNull Looper): @NonNull Handler
@NonNull
open fun createAsync(@NonNull looper: @NonNull Looper, callback: @NonNull Handler.Callback): @NonNull Handler
Create a new Handler whose posted messages and runnables are not subject to synchronization barriers such as display vsync.
Link copied to clipboard
open fun hasCallbacks(@NonNull handler: @NonNull Handler, @NonNull r: @NonNull Runnable): Boolean
Checks if there are any pending posts of messages with callback r in the message queue.
Link copied to clipboard
open fun postDelayed(@NonNull handler: @NonNull Handler, @NonNull r: @NonNull Runnable, @Nullable token: @Nullable Any, delayMillis: Long): Boolean
Causes the Runnable r to be added to the message queue, to be run after the specified amount of time elapses.